package com.wushi.codegen.base;

public abstract class BaseEntity {
	public enum STATUS{
		NEW("新建",0),
		DESTROY("销毁",9);
		
		private String name;
		private int index;
		
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		
		public static String getIndex(int index) {
			for (STATUS status: STATUS.values()) {
				if (status.getIndex()==index)
						return status.getName();
			}
			return null;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		private STATUS(String name, int index) {
			this.name = name;
			this.index = index;
		}
		
		
	};
	
	public abstract String toString();
	

}
